package com.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.demo.dao.PermissionDao;
import com.demo.dao.UserDao;
import com.demo.entity.Permission;
import com.demo.service.PermissionService;

@Service
public class PermissionServiceImpl implements PermissionService{

	@Autowired
	private PermissionDao permissionDao;
	
	private UserDao userDao;
	
	/**
	 * @param roleId
	 * @return List<Permission>
	 * 根据roldId获取相应的Permission集合
	 * */
	@Override
	public List<Permission> getPermissions(String roleId) {
		
		return permissionDao.findPermissionsByRoleId(roleId);
	}
	
	

	/**
	 * @param username
	 * @return List<Permission>
	 * 根据roldId获取相应的Permission集合
	 * */
	@Override
	public List<Permission> getPermissionsByUsername(String username) {
		return null;
	}

}
